<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core_rt" %>
<c:set var="ctx" value="${pageContext.request.contextPath}" />
<!--引入jquery包-->
<script type="text/javascript" src="${ctx}/js/jquery.min.js" ></script>
<!--引入easyui所需要的包-->
<script type="text/javascript" src="${ctx}/js/jquery.easyui.min.js" ></script>
<script type="text/javascript" src="${ctx}/js/easyui-lang-zh_CN.js" ></script>

<!--拓展包-->
<script type="text/javascript" src="${ctx}/js/extEasyUI.js" ></script>
<script type="text/javascript" src="${ctx}/js/extJquery.js" ></script>

<!--easyui的主题包-->
<link rel="stylesheet" href="${ctx}/css/themes/metro/easyui.css" />
<link rel="stylesheet" href="${ctx}/css/themes/icon.css" />
<style type="text/css">
	#formData table{
		border: 1px solid #94BAE7;
		width: 100%;
		height: 100%;
		font-size: 12px;
		margin: 0;
		min-width: 430px;
		height: 250px;
	}
	#formData table td{
		border-right: 0px solid #94BAE7;
		border-bottom: 0px dashed #94BAE7;
		padding: 5px;
	}
	#formData table td input{
		padding-top:5px;
	}
</style>
<script type="text/javascript">
	$(function(){
		$(document).keydown(function(e){
			$('#tb').datagrid('options').singleSelect=false;
		});
		$(document).keyup(function(e){
			$('#tb').datagrid('options').singleSelect=true;
		});
	});
	function rebuilTable(){
		var tds = $('#dataForm table td');
		$.each(tds, function(i,td) {
			if(i<tds.length-2){
				$(this).css({"border-bottom":"1px dashed #94BAE7"});
			}
			if(i%2==0){
				$(this).css({"border-right": "1px solid #94BAE7"});
			}
		});
	}
	function submitData(url,data){
		$.ajax({
			type:'post',
			url:url,
			data:data,
			dataType:'json',
			success:function(result){
				$.messager.alert('保存信息框',result.msg,'info');
				if(result.sus){
					$('#tb').datagrid('reload');//刷新数据
					if(data!=''){
						$('#d1').dialog('close');
					}
				}
			}
		});
	}
	
	
	
	
	
	
	
	
	
</script>